/**
 * 
 */
package edu.hit.irlab.tms.datamapping;

import java.io.Serializable;
import java.util.ArrayList;


/**
 * @author chuter
 *
 */
public class Paragraph implements Serializable {
	private static final long serialVersionUID = 1987L;
	private int id;
	private int enddocumentpos;
	
	private ArrayList<Sentence> sentences = new ArrayList<Sentence>();

	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getBeginSentenceId() {
		try {
			return sentences.get(0).getId();
		} catch (NullPointerException e){
			e.printStackTrace();
		}
		
		return -1;
	}

	public int getEndSentenceId() {
		return getBeginSentenceId() + sentences.size() - 1;
	}

	public ArrayList<Sentence> getSentences() {
		return sentences;
	}

	public void setSentences(ArrayList<Sentence> sentences) {
		this.sentences = sentences;
	}
	
	public void setenddocumentpos(int pos) {
		enddocumentpos = pos;
	}
	
	public int getenddocumentpos() {
		return enddocumentpos;
	}
	

}
